﻿using Super.Admin.Entities;

namespace Super.Admin.IServices
{
    /// <summary>
    /// 公告管理服务接口类
    /// </summary>
    public interface IAnnouncementService : IBaseService
    {
        /// <summary>
        /// 查询所有公告
        /// </summary>
        /// <returns>公告管理实体集合</returns>
        IReadOnlyCollection<AnnouncementEntity> GetAnnouncements();
        /// <summary>
        /// 查询公告
        /// </summary>
        /// <param name="title">标题</param>
        /// <param name="content">内容</param>
        /// <param name="beginTime">创建开始时间</param>
        /// <param name="endTime">创建结束时间</param>
        /// <param name="createUserId">创建人</param>
        /// <param name="updateUserId">修改人</param>
        /// <param name="status">状态：0：草稿，1：发布</param>
        /// <param name="pageSize">一页数量</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="totalCount">总数</param>
        /// <returns>公告管理实体集合</returns>
        IReadOnlyCollection<AnnouncementEntity> GetAnnouncements(string title, string content, string beginTime, string endTime, int createUserId, int updateUserId, int status, int pageSize, int pageIndex, out int totalCount);
        /// <summary>
        /// 创建公告
        /// </summary>
        /// <param name="announcementEntity">公告类</param>
        /// <param name="userId">创建人</param>
        void CreateAnnouncement(AnnouncementEntity announcementEntity, int userId);
        /// <summary>
        /// 修改公告
        /// </summary>
        /// <param name="announcementEntity">公告实体</param>
        /// <param name="userId">修改人</param>
        void UpdateAnnouncement(AnnouncementEntity announcementEntity, int userId);
        /// <summary>
        /// 发布公告/取消发布公告
        /// </summary>
        /// <param name="announcementId">需要发布/取消的公告Id</param>
        /// <param name="userId">操作人Id</param>
        void PublishAnnouncement(int announcementId, int userId);
        /// <summary>
        /// 删除公告
        /// </summary>
        /// <param name="announcementId">公告ID</param>
        void DeleteAnnouncement(int announcementId);
        /// <summary>
        /// 批量删除公告
        /// </summary>
        /// <param name="announcementIds">批量删除的Id</param>
        void DeleteAnnouncements(IEnumerable<int> announcementIds);
    }
}
